import request from "@/utils/request";

// 查询会员收藏的商品列表
export function listCollectSpu(query) {
  return request({
    url: "/member/collectSpu/list/currentUser",
    method: "get",
    params: query,
  });
}

// 查询会员收藏的商品详细
export function getCollectSpu(id) {
  return request({
    url: "/member/collectSpu/" + id,
    method: "get",
  });
}

// 新增会员收藏的商品
export function addCollectSpu(data) {
  return request({
    url: "/member/collectSpu",
    method: "post",
    data: data,
  });
}

// 修改会员收藏的商品
export function updateCollectSpu(data) {
  return request({
    url: "/member/collectSpu",
    method: "put",
    data: data,
  });
}

// 删除会员收藏的商品
export function delCollectSpu(id) {
  return request({
    url: "/member/collectSpu/" + id,
    method: "delete",
  });
}
